import request from '@/utils/request'

// 创建物料质检历史记录
export function createQcHistory(data) {
  return request({
    url: '/hs/qc-history/create',
    method: 'post',
    data: data
  })
}

// 更新物料质检历史记录
export function updateQcHistory(data) {
  return request({
    url: '/hs/qc-history/update',
    method: 'put',
    data: data
  })
}

// 删除物料质检历史记录
export function deleteQcHistory(id) {
  return request({
    url: '/hs/qc-history/delete?id=' + id,
    method: 'delete'
  })
}

// 获得物料质检历史记录
export function getQcHistory(id) {
  return request({
    url: '/hs/qc-history/get?id=' + id,
    method: 'get'
  })
}

// 获得物料质检历史记录分页
export function getQcHistoryPage(params) {
  return request({
    url: '/hs/qc-history/page',
    method: 'get',
    params
  })
}
// 导出物料质检历史记录 Excel
export function exportQcHistoryExcel(params) {
  return request({
    url: '/hs/qc-history/export-excel',
    method: 'get',
    params,
    responseType: 'blob'
  })
}